<?PHP
  class AddImagePage extends Editor{
    function __construct($page){
      $this->page = $page;
    }
  
    public function display(){
      $template = new Template();
      $template->load("message");
      if(ImageServer::insert($_POST['path'],$_POST['name'],$_POST['description'])){
        $template->assign_var("MESSAGE",htmlentities($GLOBALS['language']->getString("IMAGE_ADDED")));
      }
      else{
        $template->assign_var("MESSAGE",htmlentities($GLOBALS['language']->getString("IMAGE_NOT_ADDED")));
      }
      $template->output();
    }

    function getHeader(){
    }
    
    public function getEditableCode(){
      return "<input name=\"save\" type=\"submit\" value=\"&Auml;ndern\" onclick=\"form.action='".$_SERVER['PHP_SELF']."?".$_SERVER['QUERY_STRING']."' ; target='_self' ; return true\" />";
    }
    
    public function save($newPage,$oldPage){
    }    
}
?>